home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.05 May 97 / OpenDialog Review / CreateModelessDialog.c
Encoding:
Text File  |  1997-03-26  |  525 b   |  22 lines  |  [TEXT/R*ch]

  1. void CreateModelessDialog(short DialogID, DialogPtr *theNewDialog)
  2. {
  3.     short     tempType;
  4.     short     numItems;
  5.     short    i;
  6.  
  7.     *theNewDialog = NULL;
  8.     *theNewDialog = DMX_GetNewDialog
  9.             (DialogID, kDMX_Modeless, 0L,kDMFlag_DoIdleEvents);
  10.     if (*theNewDialog !=NULL) {
  11.         numItems = DMX_CountDITL(*theNewDialog) +1;
  12.         for (i=1;i<numItems; i++){
  13.             tempType = DMX_GetItemType(*theNewDialog,i);
  14.             if (tempType==editText)
  15.                 DMX_SetIBarFlag(*theNewDialog,i,true);
  16.             }
  17.         ShowWindow(*theNewDialog);
  18.         SetPort(*theNewDialog);
  19.     }
  20.         return;
  21. }
  22.